using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Maticsoft.Web.Admin.Cinquiry
{
    public partial class Show : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    string id = Request.Params["id"];
                    Navigation011.Para_Str = "id=" + id;
                    if (id == null || id.Trim() == "")
                    {
                        Response.Redirect("Index.aspx");
                        Response.End();
                    }
                    else
                    {
                        ShowInfo(int.Parse(id));
                    }
                
                }
            }
        }

        private void ShowInfo(int id)
        {
            Maticsoft.BLL.Cinquiry.C_Inquiry bll = new Maticsoft.BLL.Cinquiry.C_Inquiry();
            Maticsoft.Model.Cinquiry.C_Inquiry model = bll.GetModel(id);
            this.lblid.Text = model.id.ToString();
            this.lbltitle.Text = model.title;
            this.lblcount.Text = model.count.ToString();
            this.chkisuse.Checked = model.isuse;

        }
    }
}
